package com.project.bean;

/**
 * 回帖实体
 */
public class ReturnPostBean {
    /**回帖id*/
    private int id;
    /**标题*/
    private String title;
    /**回帖内容*/
    private String content;
    /**用户id*/
    private UserBean user;
    /**主贴id*/
    private MainPostBean mainPost;

    public ReturnPostBean(String title, String content, int userId, int mainPostId) {
        this.title = title;
        this.content = content;
        this.user = new UserBean();
        user.setId(userId);
        this.mainPost = new MainPostBean();
        mainPost.setId(mainPostId);

    }

    public ReturnPostBean() {
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public UserBean getUser() {
        return user;
    }

    public void setUser(UserBean user) {
        this.user = user;
    }

    public MainPostBean getMainPost() {
        return mainPost;
    }

    public void setMainPost(MainPostBean mainPost) {
        this.mainPost = mainPost;
    }

    @Override
    public String toString() {
        return "ReturnPostBean{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", user=" + user +
                ", mainPost=" + mainPost +
                '}';
    }
}
